package cn.aixuegao.common.exception;

import cn.aixuegao.common.exception.enums.IceyExceptionEnum;

public class ErrorInfo<T> {
    private Integer code;
    private String message;
    private String url;
    private T data;

    public ErrorInfo( ) {
    	
    }
    
    public ErrorInfo(IceyExceptionEnum ExceptionEnum) {
    	this.code=ExceptionEnum.getCode();
    	this.message=ExceptionEnum.getMessage();
    }
    
    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }
    
    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }
    
    public void setCode(IceyExceptionEnum ExceptionEnum) {
    	this.code = ExceptionEnum.getCode();
    }
    
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
    
    public void setMessage(IceyExceptionEnum ExceptionEnum) {
    	this.message = ExceptionEnum.getMessage();
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}
